<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box1,.box2,.box3{
     padding: 50px;
    }
    .box1{
      background-color: #ca8f8f;
    }
    .box2{
      background-color: #93d461;
    }
    .box3{
      background-color: #8d54be;
    }
  </style>
</head>
<body>
  <div id="app">
    <div class="box1" @click="fn1(1)">
      <div class="box2" @click="fn2(2)">
        <div class="box3" @click.stop="fn3(3)"></div>
      </div>
    </div>
    <a @click.prevent href="http://www.baidu.com">百度一下</a>
  </div>
  <script src="./vue.global.js"></script>
  <script>
    const { createApp } = Vue;
    // 创建应用实例
    const app = createApp({
      data(){
        return {
          
        }
      },
      methods: {
        fn3(n){
      
          
          console.log(n);
        },
        fn2(n){
          console.log(n);
        },
        fn1(n){
          console.log(n);
        }
      }
    })
    app.mount('#app')
   
  </script>
</body>
</html>